<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/2/4
 * Time: 21:28
 */
$tel=$_REQUEST["tel"];
$num=$_REQUEST["num"];
$url="http://utf8.sms.webchinese.cn/?Uid=kuiyemvp&Key=e9048988687157e130fd&smsMob=".$tel."&smsText=欢迎加入贝壳快餐，你的验证码是".$num."";
$s=Get($url);
function Get($url)
{
    if(function_exists('file_get_contents'))
    {
        $file_contents = file_get_contents($url);
    }
    else
    {
        $ch = curl_init();
        $timeout = 5;
        curl_setopt ($ch, CURLOPT_URL, $url);
        curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        $file_contents = curl_exec($ch);
        curl_close($ch);
    }
    return $file_contents;
}

$arr = array ('type'=>$s);
$jarr =array('list' => $arr);
print(json_encode($jarr));

return 0;
?>